﻿<%@ Page Language="C#" MasterPageFile="~/Templates/Admin.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Admin_Resource_OtherResource_Default" Title="Untitled Page" %>
<%@ Register Assembly="Jalal.Library" Namespace="Jalal.Library.Web.Control" TagPrefix="ucc" %>
<%@ Register Src="~/Controls/wucEmptyGridMessage.ascx" TagName="EmptyGridMessage" TagPrefix="wuc" %>
<%@ Register Src="~/Controls/wucDatePicker.ascx" TagName="DatePicker" TagPrefix="wuc" %>
<%@ Import Namespace="Jalal.Library.Utility" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script src="<%= siteRoot %>Javascripts/Common/ApplicationCommon.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MiddleArea" Runat="Server">
    <table width="100%" cellpadding="10" border="0" cellspacing="10" class="table_area">
        <tr>
            <td class="heading-text">
                OtherResources
            </td>
        </tr>
        <tr>
            <td>
                <ucc:ResponseMessage ID="uccResponse" runat="server"></ucc:ResponseMessage>
            </td>
        </tr>
        <tr>
            <td>
                <table class="search-box">
                    <tr>
                        <td>
                            <table cellpadding="5" cellspacing="5">
                                <tr align="left">
                                    <td>Title <asp:TextBox ID="tbxTitle" runat="server"></asp:TextBox></td>
                                    <td class="gap">&nbsp;</td>
                                    <td>Active
                                        <asp:DropDownList ID="ddlActive" runat="server">
                                            <asp:ListItem Text="All" Value="-1"></asp:ListItem>
                                            <asp:ListItem Text="Active" Value="True"></asp:ListItem>
                                            <asp:ListItem Text="Inactive" Value="False"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td class="gap">&nbsp;</td>
                                    <td>Game Title <asp:TextBox ID="tbxGameTitle" runat="server"></asp:TextBox></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table cellpadding="5" cellspacing="5">
                                <tr align="left">
                                    <td>Create Date From</td>
                                    <td><wuc:DatePicker ID="createDateFrom" runat="server" YearFrom="2009" YearTo="2020" /></td>
                                    <td class="gap">&nbsp;</td>
                                    <td>Create Date To</td>
                                    <td><wuc:DatePicker ID="createDateTo" runat="server" YearFrom="2009" YearTo="2020" /></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="button" OnClick="Search_Click" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="right">
                <table>
                    <tr>
                        <td>
                            <asp:Button ID="btnUpadateActive" runat="server" Text="Update Active" 
                                OnClick="UpdateActive_Click" CssClass="button" />
                        </td>
                        <td>
                            <asp:Button ID="btnUpdateDelete" runat="server" Text="Delete" 
                                OnClick="Delete_Click" CssClass="button" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <asp:GridView ID="grvOtherResources" runat="server" AutoGenerateColumns="false" PageSize="20" AllowPaging="false"
                    AllowSorting="false" OnRowDataBound="Grid_RowDataBound" HeaderStyle-Font-Bold="true" 
                    Width="100%" AlternatingRowStyle-BackColor="#F5F5F5" CellPadding="0" CellSpacing="0" >
                    <Columns>
                        <asp:TemplateField>
                            <HeaderStyle HorizontalAlign="Center" />
                            <HeaderTemplate>
                                <table>
                                    <tr>
                                        <td rowspan="2" valign="middle">
                                            #</td>
                                        <td>
                                            <ucc:SortButton ID="SortButton1" IsSortUpButton="true" runat="server"
                                                OnCommand="Grid_Sort" CommandName="Sort" CommandArgument="OtherResourceId" /></td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <ucc:SortButton ID="SortButton2" IsSortUpButton="false" runat="server"
                                                OnCommand="Grid_Sort" CommandName="Sort" CommandArgument="OtherResourceId Desc" /></td>
                                    </tr>
                                </table>
                            </HeaderTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:Label ID="lblId" runat="server" Text='<%# Eval("OtherResourceId") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <table>
                                    <tr>
                                        <td rowspan="2" valign="middle">
                                            Title</td>
                                        <td>
                                            <ucc:SortButton ID="SortButton3" IsSortUpButton="true" runat="server"
                                                OnCommand="Grid_Sort" CommandName="Sort" CommandArgument="Title" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <ucc:SortButton ID="SortButton4" IsSortUpButton="false" runat="server"
                                                OnCommand="Grid_Sort" CommandName="Sort" CommandArgument="Title Desc" />
                                        </td>
                                    </tr>
                                </table>
                            </HeaderTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title") %>' ></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <table>
                                    <tr>
                                        <td rowspan="2" valign="middle">
                                            Related Game</td>
                                        <td>
                                            <ucc:SortButton ID="SortButton5" IsSortUpButton="true" runat="server"
                                                OnCommand="Grid_Sort" CommandName="Sort" CommandArgument="GameTitle" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <ucc:SortButton ID="SortButton6" IsSortUpButton="false" runat="server"
                                                OnCommand="Grid_Sort" CommandName="Sort" CommandArgument="GameTitle Desc" />
                                        </td>
                                    </tr>
                                </table>
                            </HeaderTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label ID="lblGameTitle" runat="server" ></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderStyle HorizontalAlign="Center" />
                            <HeaderTemplate>
                                <table>
                                    <tr>
                                        <td rowspan="2" valign="middle">
                                            Created On</td>
                                        <td>
                                            <ucc:SortButton ID="SortButton7" IsSortUpButton="true" runat="server"
                                                OnCommand="Grid_Sort" CommandName="Sort"  CommandArgument="CreateDateTime" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <ucc:SortButton ID="SortButton8" IsSortUpButton="false" runat="server"
                                                OnCommand="Grid_Sort" CommandName="Sort" CommandArgument="CreateDateTime Desc" />
                                        </td>
                                    </tr>
                                </table>
                            </HeaderTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:Label ID="lblCreateDateTime" runat="server" 
                                    Text='<%# CommonUtility.FormatedDateString((DateTime)Eval("CreateDateTime")) %>' ></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Active
                            </HeaderTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:CheckBox ID="cbxActive" runat="server" Checked='<%# Eval("IsActive") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:HyperLink ID="hlkEdit" runat="server" Text="Edit"></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <asp:CheckBox ID="cbxSelectAll" runat="server" />
                            </HeaderTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:CheckBox ID="cbxSelect" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        <wuc:EmptyGridMessage ID="EmptyGridMessage1" runat="server" MessageText="There is no record" />
                    </EmptyDataTemplate>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td align="center">
                <asp:Repeater ID="rptPager" runat="server" OnItemDataBound="Pager_DataBound">
                    <ItemTemplate>
                        <asp:LinkButton ID="lkbPageIndex" runat="server" CssClass="page-index" 
                            Text='<%# Container.DataItem.ToString() %>' CommandName="PagingCommand"
                            CommandArgument='<%# Container.DataItem %>'
                            OnCommand="Page_Change"></asp:LinkButton>
                    </ItemTemplate>
                </asp:Repeater>
            </td>
        </tr>
        <tr>
            <td align="left">
                <table>
                    <tr>
                        <td>
                            <asp:Button ID="btnUpdateActive2" runat="server" Text="Update Active" 
                                OnClick="UpdateActive_Click" CssClass="button" />
                        </td>
                        <td>
                            <asp:Button ID="btnDelete2" runat="server" Text="Delete" 
                                OnClick="Delete_Click" CssClass="button" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
